<extend name="Public/base"/>

<block name="body">
    <form method="POST" id="form1" action="">
        <div class="main-title">
            <h2>当日销售明细</h2>
        </div>
        <a onclick="history.go(-1)" class="btn btn-return" style="color: #fff;background-color: yellowgreen;">返 回</a>
        <div class="data-table table-striped">
            <table>
                <thead>
                <tr>
                    <th>商品名</th>
                    <th>数量</th>
                    <th>价格总计</th>
                </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr>
                            <td>{$vo.pName} </td>
                            <td>{$vo.total}</td>
                            <td>{$vo.num}</td>
                            <!--<td><a href="{:U('Sort/planbyday',array('aday'=>$vo['aday']))}" class="btn btn-success">明细</a></td>-->
                        </tr>
                    </volist>
                    <else/>
                    <td colspan="5" class="text-center"> aOh! 暂时还没有内容! </td>
                </notempty>
                </tbody>
            </table>
        </div>
        <div class="page">
            {$_page}
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">

        $(function () {
            $('.time').datetimepicker({
                format: 'Y-m-d',
                language: "zh-CN",
                minView: 2,
                autoclose: true
            });
        });

        $("#search").click(function () {
            var url = $(this).attr('url');

            var query = $('.search-form').find('input').serialize();
            var queryselect = $('.search-form').find('select').serialize();

            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            queryselect = queryselect.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            queryselect = queryselect.replace(/^&/g, '');

            if (url.indexOf('?') > 0) {
                url += '&' + query;
                url += '&' + queryselect;
            } else {
                url += '?' + query;
                url += '?' + queryselect;
            }

            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });
        highlight_subnav('{:U('spreport/invoicing')}');
    </script>
</block>